﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Kokomo.PeInspector.VisualStudioAdapter
{
	/// <summary>
	/// Represents a resource item within a <see cref="CSharpProject"/>.
	/// </summary>
	public class ResourceItem : ProjectItem
	{
		/// <summary>
		/// Gets a value indicating whether the resource is a <c>pack://</c> resource.
		/// </summary>
		public bool IsPack { get; set; }

		public override void WriteXml(System.Xml.XmlWriter writer)
		{
			string elementName =
				this.IsPack
				? "Resource"
				: "EmbeddedResource"
				;
			writer.WriteStartElement(elementName);

			base.WriteXmlAttributes(writer);

			writer.WriteEndElement();
		}
	}
}
